home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / PInterfaces / CMICCProfile.p < prev    next >
Encoding:
Text File  |  1995-07-06  |  21.3 KB  |  676 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMICCProfile.p
  3.  
  4.      Contains:    Definitions for ColorSync 2.0 profile
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. }
  19.  
  20. {$IFC UNDEFINED UsingIncludes}
  21. {$SETC UsingIncludes := 0}
  22. {$ENDC}
  23.  
  24. {$IFC NOT UsingIncludes}
  25.  UNIT CMICCProfile;
  26.  INTERFACE
  27. {$ENDC}
  28.  
  29. {$IFC UNDEFINED __CMICCPROFILE__}
  30. {$SETC __CMICCPROFILE__ := 1}
  31.  
  32. {$I+}
  33. {$SETC CMICCProfileIncludes := UsingIncludes}
  34. {$SETC UsingIncludes := 1}
  35.  
  36.  
  37. {$IFC UNDEFINED __TYPES__}
  38. {$I Types.p}
  39. {$ENDC}
  40. {    ConditionalMacros.p                                            }
  41.  
  42. {$PUSH}
  43. {$ALIGN MAC68K}
  44. {$LibExport+}
  45.  
  46. CONST
  47.     cmCS2ProfileVersion            = $02000000;
  48.  
  49. { Current Major version number }
  50.     cmCurrentProfileMajorVersion = $02000000;
  51.  
  52. { magic cookie number for anonymous file ID }
  53.     cmMagicNumber                = 'acsp';
  54.  
  55. { ColorSync profile version 1.0 }
  56.     cmCS1ProfileVersion            = $00000100;
  57.  
  58. {**********************************************************************}
  59. {************** ColorSync 2.0 profile specification *******************}
  60. {**********************************************************************}
  61. { profile flags element values }
  62.     cmEmbeddedProfile            = 0;                            { 0 is not embedded profile, 1 is embedded profile }
  63.     cmEmbeddedUse                = 1;                            { 0 is to use anywhere, 1 is to use as embedded profile only }
  64.  
  65. { data type element values }
  66.     cmAsciiData                    = 0;
  67.     cmBinaryData                = 1;
  68.  
  69. { rendering intent element values  }
  70.     cmPerceptual                = 0;                            { Photographic images }
  71.     cmRelativeColorimetric        = 1;                            { Logo Colors }
  72.     cmSaturation                = 2;                            { Business graphics }
  73.     cmAbsoluteColorimetric        = 3;                            { Logo Colors }
  74.  
  75. { speed and quality flag options }
  76.     cmNormalMode                = 0;                            { it uses the least significent two bits in the high word of flag }
  77.     cmDraftMode                    = 1;                            { it should be evaulated like this: right shift 16 bits first, mask off the }
  78.     cmBestMode                    = 2;                            { high 14 bits, and then compare with the enum to determine the option value }
  79.  
  80. { device/media attributes element values  }
  81.     cmReflective                = 0;                            { 0 is reflective media, 1 is transparency media }
  82.     cmGlossy                    = 1;                            { 0 is glossy, 1 is matte }
  83.  
  84. { screen encodings  }
  85.     cmPrtrDefaultScreens        = 0;                            { Use printer default screens.  0 is false, 1 is ture }
  86.     cmLinesPer                    = 1;                            { 0 is LinesPerCm, 1 is LinesPerInch }
  87.  
  88. { 2.0 tag type information }
  89.     cmNumHeaderElements            = 10;
  90.  
  91. { public tags }
  92.     cmAToB0Tag                    = 'A2B0';
  93.     cmAToB1Tag                    = 'A2B1';
  94.     cmAToB2Tag                    = 'A2B2';
  95.     cmBlueColorantTag            = 'bXYZ';
  96.     cmBlueTRCTag                = 'bTRC';
  97.     cmBToA0Tag                    = 'B2A0';
  98.     cmBToA1Tag                    = 'B2A1';
  99.     cmBToA2Tag                    = 'B2A2';
  100.     cmCalibrationDateTimeTag    = 'calt';
  101.     cmCharTargetTag                = 'targ';
  102.     cmCopyrightTag                = 'cprt';
  103.     cmDeviceMfgDescTag            = 'dmnd';
  104.     cmDeviceModelDescTag        = 'dmdd';
  105.     cmGamutTag                    = 'gamt';
  106.     cmGrayTRCTag                = 'kTRC';
  107.     cmGreenColorantTag            = 'gXYZ';
  108.     cmGreenTRCTag                = 'gTRC';
  109.     cmLuminanceTag                = 'lumi';
  110.     cmMeasurementTag            = 'meas';
  111.     cmMediaBlackPointTag        = 'bkpt';
  112.     cmMediaWhitePointTag        = 'wtpt';
  113.     cmNamedColorTag                = 'ncol';
  114.     cmPreview0Tag                = 'pre0';
  115.     cmPreview1Tag                = 'pre1';
  116.     cmPreview2Tag                = 'pre2';
  117.     cmProfileDescriptionTag        = 'desc';
  118.     cmProfileSequenceDescTag    = 'pseq';
  119.     cmPS2CRD0Tag                = 'psd0';
  120.     cmPS2CRD1Tag                = 'psd1';
  121.     cmPS2CRD2Tag                = 'psd2';
  122.     cmPS2CRD3Tag                = 'psd3';
  123.     cmPS2CSATag                    = 'ps2s';
  124.     cmPS2RenderingIntentTag        = 'ps2i';
  125.     cmRedColorantTag            = 'rXYZ';
  126.     cmRedTRCTag                    = 'rTRC';
  127.     cmScreeningDescTag            = 'scrd';
  128.     cmScreeningTag                = 'scrn';
  129.     cmTechnologyTag                = 'tech';
  130.     cmUcrBgTag                    = 'bfd ';
  131.     cmViewingConditionsDescTag    = 'vued';
  132.     cmViewingConditionsTag        = 'view';
  133.  
  134. { custom tags }
  135.     cmPS2CRDVMSizeTag            = 'psvm';
  136.  
  137. { technology tag descriptions }
  138.     cmTechnologyFilmScanner        = 'fscn';
  139.     cmTechnologyReflectiveScanner = 'rscn';
  140.     cmTechnologyInkJetPrinter    = 'ijet';
  141.     cmTechnologyThermalWaxPrinter = 'twax';
  142.     cmTechnologyElectrophotographicPrinter = 'epho';
  143.     cmTechnologyElectrostaticPrinter = 'esta';
  144.     cmTechnologyDyeSublimationPrinter = 'dsub';
  145.     cmTechnologyPhotographicPaperPrinter = 'rpho';
  146.     cmTechnologyFilmWriter        = 'fprn';
  147.     cmTechnologyVideoMonitor    = 'vidm';
  148.     cmTechnologyVideoCamera        = 'vidc';
  149.     cmTechnologyProjectionTelevision = 'pjtv';
  150.     cmTechnologyCRTDisplay        = 'CRT ';
  151.     cmTechnologyPMDisplay        = 'PMD ';
  152.     cmTechnologyAMDisplay        = 'AMD ';
  153.     cmTechnologyPhotoCD            = 'KPCD';
  154.     cmTechnologyPhotoImageSetter = 'imgs';
  155.     cmTechnologyGravure            = 'grav';
  156.     cmTechnologyOffsetLithography = 'offs';
  157.     cmTechnologySilkscreen        = 'silk';
  158.     cmTechnologyFlexography        = 'flex';
  159.  
  160. { type signatures }
  161.     cmSigCurveType                = 'curv';
  162.     cmSigDataType                = 'data';
  163.     cmSigDateTimeType            = 'dtim';
  164.     cmSigLut16Type                = 'mft2';
  165.     cmSigLut8Type                = 'mft1';
  166.     cmSigMeasurementType        = 'meas';
  167.     cmSigNamedColorType            = 'ncol';
  168.     cmSigProfileDescriptionType    = 'desc';
  169.     cmSigScreeningType            = 'scrn';
  170.     cmSigS15Fixed16Type            = 'sf32';
  171.     cmSigSignatureType            = 'sig ';
  172.     cmSigTextType                = 'text';
  173.     cmSigU16Fixed16Type            = 'uf32';
  174.     cmSigU1Fixed15Type            = 'uf16';
  175.     cmSigUInt32Type                = 'ui32';
  176.     cmSigUInt64Type                = 'ui64';
  177.     cmSigUInt8Type                = 'ui08';
  178.     cmSigViewingConditionsType    = 'view';
  179.     cmSigXYZType                = 'XYZ ';
  180.  
  181. { Measurement type encodings }
  182. { Measurement Flare }
  183.     cmFlare0                    = $00000000;
  184.     cmFlare100                    = $00000001;
  185.  
  186. { Measurement Geometry    }
  187.     cmGeometryUnknown            = $00000000;
  188.     cmGeometry045or450            = $00000001;
  189.     cmGeometry0dord0            = $00000002;
  190.  
  191. { Standard Observer    }
  192.     cmStdobsUnknown                = $00000000;
  193.     cmStdobs1931TwoDegrees        = $00000001;
  194.     cmStdobs1964TenDegrees        = $00000002;
  195.  
  196. { Standard Illuminant }
  197.     cmIlluminantUnknown            = $00000000;
  198.     cmIlluminantD50                = $00000001;
  199.     cmIlluminantD65                = $00000002;
  200.     cmIlluminantD93                = $00000003;
  201.     cmIlluminantF2                = $00000004;
  202.     cmIlluminantD55                = $00000005;
  203.     cmIlluminantA                = $00000006;
  204.     cmIlluminantEquiPower        = $00000007;
  205.     cmIlluminantF8                = $00000008;
  206.  
  207. { Spot Function Value }
  208.     cmSpotFunctionUnknown        = 0;
  209.     cmSpotFunctionDefault        = 1;
  210.     cmSpotFunctionRound            = 2;
  211.     cmSpotFunctionDiamond        = 3;
  212.     cmSpotFunctionEllipse        = 4;
  213.     cmSpotFunctionLine            = 5;
  214.     cmSpotFunctionSquare        = 6;
  215.     cmSpotFunctionCross            = 7;
  216.  
  217. { Color Space Signatures }
  218.     cmXYZData                    = 'XYZ ';
  219.     cmLabData                    = 'Lab ';
  220.     cmLuvData                    = 'Luv ';
  221.     cmYxyData                    = 'Yxy ';
  222.     cmRGBData                    = 'RGB ';
  223.     cmGrayData                    = 'GRAY';
  224.     cmHSVData                    = 'HSV ';
  225.     cmHLSData                    = 'HLS ';
  226.     cmCMYKData                    = 'CMYK';
  227.     cmCMYData                    = 'CMY ';
  228.     cmMCH5Data                    = 'MCH5';
  229.     cmMCH6Data                    = 'MCH6';
  230.     cmMCH7Data                    = 'MCH7';
  231.     cmMCH8Data                    = 'MCH8';
  232.  
  233. { profileClass enumerations }
  234.     cmInputClass                = 'scnr';
  235.     cmDisplayClass                = 'mntr';
  236.     cmOutputClass                = 'prtr';
  237.     cmLinkClass                    = 'link';
  238.     cmAbstractClass                = 'abst';
  239.     cmColorSpaceClass            = 'spac';
  240.  
  241. { platform enumerations }
  242.     cmMacintosh                    = 'APPL';
  243.     cmMicrosoft                    = 'MSFT';
  244.     cmSolaris                    = 'SUNW';
  245.     cmSiliconGraphics            = 'SGI ';
  246.     cmTaligent                    = 'TGNT';
  247.  
  248. { ColorSync 1.0 elements }
  249.     cmCS1ChromTag                = 'chrm';
  250.     cmCS1TRCTag                    = 'trc ';
  251.     cmCS1NameTag                = 'name';
  252.     cmCS1CustTag                = 'cust';
  253.  
  254. { General element data types }
  255.  
  256. TYPE
  257.     CMDateTime = RECORD
  258.         year:                    INTEGER;
  259.         month:                    INTEGER;
  260.         dayOfTheMonth:            INTEGER;
  261.         hours:                    INTEGER;
  262.         minutes:                INTEGER;
  263.         seconds:                INTEGER;
  264.     END;
  265.  
  266.     CMFixedXYZColor = RECORD
  267.         X:                        Fixed;
  268.         Y:                        Fixed;
  269.         Z:                        Fixed;
  270.     END;
  271.  
  272.     CMXYZComponent = INTEGER;
  273.  
  274.     CMXYZColor = RECORD
  275.         X:                        CMXYZComponent;
  276.         Y:                        CMXYZComponent;
  277.         Z:                        CMXYZComponent;
  278.     END;
  279.  
  280.     CM2Header = RECORD
  281.         size:                    LONGINT;                                { This is the total size of the Profile }
  282.         CMMType:                OSType;                                    { CMM signature,  Registered with CS2 consortium  }
  283.         profileVersion:            LONGINT;                                { Version of CMProfile format }
  284.         profileClass:            OSType;                                    { input, display, output, devicelink, abstract, or color conversion profile type }
  285.         dataColorSpace:            OSType;                                    { color space of data }
  286.         profileConnectionSpace:    OSType;                                    { profile connection color space }
  287.         dateTime:                CMDateTime;                                { date and time of profile creation }
  288.         CS2profileSignature:    OSType;                                    { 'acsp' constant ColorSync 2.0 file ID }
  289.         platform:                OSType;                                    { primary profile platform, Registered with CS2 consortium }
  290.         flags:                    LONGINT;                                { profile flags }
  291.         deviceManufacturer:        OSType;                                    { Registered with CS2 consortium }
  292.         deviceModel:            LONGINT;                                { Registered with CS2 consortium }
  293.         deviceAttributes:        ARRAY [0..1] OF LONGINT;                { Attributes like paper type }
  294.         renderingIntent:        LONGINT;                                { preferred rendering intent of tagged object }
  295.         white:                    CMFixedXYZColor;                        { profile illuminant }
  296.         reserved:                ARRAY [0..47] OF CHAR;                    { reserved for future use }
  297.     END;
  298.  
  299.     CMTagRecord = RECORD
  300.         tag:                    OSType;                                    { Registered with CS2 consortium }
  301.         elementOffset:            LONGINT;                                { Relative to start of CMProfile }
  302.         elementSize:            LONGINT;
  303.     END;
  304.  
  305.     CMTagElemTable = RECORD
  306.         count:                    LONGINT;
  307.         tagList:                ARRAY [0..0] OF CMTagRecord;            { Variable size }
  308.     END;
  309.  
  310. { External 0x02002001 CMProfile }
  311.     CM2Profile = RECORD
  312.         header:                    CM2Header;
  313.         tagTable:                CMTagElemTable;
  314.         elemData:                ARRAY [0..0] OF CHAR;                    { Tagged element storage. Variable size }
  315.     END;
  316.  
  317.     CM2ProfilePtr = ^CM2Profile;
  318.     CM2ProfileHandle = ^CM2ProfilePtr;
  319.  
  320. { Tag Type Definitions }
  321.     CMCurveType = RECORD
  322.         typeDescriptor:            OSType;                                    { 'curv' }
  323.         reserved:                LONGINT;                                { fill with 0x00 }
  324.         countValue:                LONGINT;                                { number of entries in table that follows }
  325.         data:                    ARRAY [0..0] OF INTEGER;                { Tagged element storage. Variable size }
  326.     END;
  327.  
  328.     CMDataType = RECORD
  329.         typeDescriptor:            OSType;                                    { 'data' }
  330.         reserved:                LONGINT;                                { fill with 0x00 }
  331.         dataFlag:                LONGINT;                                { 0 = ASCII, 1 = binary }
  332.         data:                    ARRAY [0..0] OF CHAR;                    { Tagged element storage. Variable size }
  333.     END;
  334.  
  335.     CMDateTimeType = RECORD
  336.         typeDescriptor:            OSType;                                    { 'dtim' }
  337.         reserved:                LONGINT;
  338.         dateTime:                CMDateTime;
  339.     END;
  340.  
  341.     CMLut16Type = RECORD
  342.         typeDescriptor:            OSType;                                    { 'mft2' }
  343.         reserved:                LONGINT;                                { fill with 0x00 }
  344.         inputChannels:            SInt8; (* unsigned char *)                { Number of input channels }
  345.         outputChannels:            SInt8; (* unsigned char *)                { Number of output channels }
  346.         gridPoints:                SInt8; (* unsigned char *)                { Number of clutTable grid points }
  347.         reserved2:                SInt8; (* unsigned char *)                { fill with 0x00 }
  348.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                { }
  349.         inputTableEntries:        INTEGER;                                { }
  350.         outputTableEntries:        INTEGER;                                { }
  351.         inputTable:                ARRAY [0..0] OF INTEGER;                { Variable size }
  352.         CLUT:                    ARRAY [0..0] OF INTEGER;                { Variable size }
  353.         outputTable:            ARRAY [0..0] OF INTEGER;                { Variable size }
  354.     END;
  355.  
  356.     CMLut8Type = RECORD
  357.         typeDescriptor:            OSType;                                    { 'mft1' }
  358.         reserved:                LONGINT;                                { fill with 0x00 }
  359.         inputChannels:            SInt8; (* unsigned char *)                { }
  360.         outputChannels:            SInt8; (* unsigned char *)                { }
  361.         gridPoints:                SInt8; (* unsigned char *)                { }
  362.         reserved2:                SInt8; (* unsigned char *)                { fill with 0x00 }
  363.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                { }
  364.         inputTable:                ARRAY [0..255] OF SInt8; (* unsigned char *) { fixed size of 256 }
  365.         CLUT:                    ARRAY [0..0] OF SInt8; (* unsigned char *) { Variable size }
  366.         outputTable:            ARRAY [0..255] OF SInt8; (* unsigned char *) { fixed size of 256 }
  367.     END;
  368.  
  369.     CMMeasurementType = RECORD
  370.         typeDescriptor:            OSType;                                    { 'meas' }
  371.         reserved:                LONGINT;                                { fill with 0x00 }
  372.         standardObserver:        LONGINT;                                { 0 : unknown, 1 : CIE 1931, 2 : CIE 1964 }
  373.         backingXYZ:                CMFixedXYZColor;                        { absolute XYZ values of backing }
  374.         geometry:                LONGINT;                                { 0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0 }
  375.         flare:                    LONGINT;                                { 0 : 0%, 1 : 100% flare }
  376.         illuminant:                LONGINT;                                { standard illuminant }
  377.     END;
  378.  
  379.     CMNamedColorType = RECORD
  380.         typeDescriptor:            OSType;                                    { 'ncol' }
  381.         reserved:                LONGINT;                                { fill with 0x00 }
  382.         vendorFlag:                LONGINT;                                { }
  383.         count:                    LONGINT;                                { count of named colors in array that follows }
  384.         prefixName:                ARRAY [0..0] OF SInt8; (* unsigned char *) { Variable size, max = 32, to access fields after this one, have to count bytes }
  385.         suffixName:                ARRAY [0..0] OF SInt8; (* unsigned char *) { Variable size, max = 32 }
  386.         colorName:            RECORD
  387.                 rootName:                        ARRAY [0..0] OF SInt8; (* unsigned char *) { Variable size, max = 32 }
  388.                 colorCoords:                    ARRAY [0..0] OF SInt8; (* unsigned char *) { Variable size  }
  389.             END;
  390.  
  391.                                                         { Variable size  }
  392.     END;
  393.  
  394.     CMTextDescriptionType = RECORD
  395.         typeDescriptor:            OSType;                                    { 'desc' }
  396.         reserved:                LONGINT;                                { fill with 0x00 }
  397.         ASCIICount:                LONGINT;                                { the count of "bytes" }
  398.         ASCIIName:                ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size, to access fields after this one, have to count bytes }
  399.         UniCodeCode:            LONGINT;
  400.         UniCodeCount:            LONGINT;                                { the count of characters, each character has two bytes }
  401.         UniCodeName:            ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  402.         ScriptCodeCode:            INTEGER;
  403.         ScriptCodeCount:        SInt8; (* unsigned char *)                { the count of "bytes" }
  404.         ScriptCodeName:            ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  405.     END;
  406.  
  407.     CMTextType = RECORD
  408.         typeDescriptor:            OSType;                                    { 'text' }
  409.         reserved:                LONGINT;                                { fill with 0x00 }
  410.         text:                    ARRAY [0..0] OF SInt8; (* unsigned char *) { count of text is obtained from tag size element }
  411.     END;
  412.  
  413.     CMScreeningType = RECORD
  414.         typeDescriptor:            OSType;                                    { 'scrn' }
  415.         reserved:                LONGINT;                                { fill with 0x00 }
  416.         screeningFlag:            LONGINT;                                { bit 0 : use printer default screens, bit 1 : inch/cm }
  417.         channelCount:            LONGINT;
  418.         channelScreening:            RECORD
  419.                 frequency:                        Fixed;
  420.                 angle:                            Fixed;
  421.                 sportFunction:                    LONGINT;
  422.             END;
  423.  
  424.                                                 { Variable size }
  425.     END;
  426.  
  427.     CMSignatureType = RECORD
  428.         typeDescriptor:            OSType;                                    { 'sig ' }
  429.         reserved:                LONGINT;                                { fill with 0x00 }
  430.         signature:                OSType;
  431.     END;
  432.  
  433.     CMS15Fixed16ArrayType = RECORD
  434.         typeDescriptor:            OSType;                                    { 'sf32' }
  435.         reserved:                LONGINT;                                { fill with 0x00 }
  436.         value:                    ARRAY [0..0] OF Fixed;                    { Variable size }
  437.     END;
  438.  
  439.     CMU16Fixed16ArrayType = RECORD
  440.         typeDescriptor:            OSType;                                    { 'uf32' }
  441.         reserved:                LONGINT;                                { fill with 0x00 }
  442.         value:                    ARRAY [0..0] OF LONGINT;                { Variable size }
  443.     END;
  444.  
  445.     CMUInt16ArrayType = RECORD
  446.         typeDescriptor:            OSType;                                    { 'ui16' }
  447.         reserved:                LONGINT;                                { fill with 0x00 }
  448.         value:                    ARRAY [0..0] OF INTEGER;                { Variable size }
  449.     END;
  450.  
  451.     CMUInt32ArrayType = RECORD
  452.         typeDescriptor:            OSType;                                    { 'ui32' }
  453.         reserved:                LONGINT;                                { fill with 0x00 }
  454.         value:                    ARRAY [0..0] OF LONGINT;                { Variable size }
  455.     END;
  456.  
  457.     CMUInt64ArrayType = RECORD
  458.         typeDescriptor:            OSType;                                    { 'ui64' }
  459.         reserved:                LONGINT;                                { fill with 0x00 }
  460.         value:                    ARRAY [0..0] OF LONGINT;                { Variable size (x2) }
  461.     END;
  462.  
  463.     CMUInt8ArrayType = RECORD
  464.         typeDescriptor:            OSType;                                    { 'ui08' }
  465.         reserved:                LONGINT;                                { fill with 0x00 }
  466.         value:                    ARRAY [0..0] OF SInt8; (* unsigned char *) { Variable size }
  467.     END;
  468.  
  469.     CMViewingConditionsType = RECORD
  470.         typeDescriptor:            OSType;                                    { 'view' }
  471.         reserved:                LONGINT;                                { fill with 0x00 }
  472.         illuminant:                CMFixedXYZColor;                        { absolute XYZs of illuminant  in cd/m^2 }
  473.         surround:                CMFixedXYZColor;                        { absolute XYZs of surround in cd/m^2 }
  474.         stdIlluminant:            LONGINT;                                { see definitions of std illuminants }
  475.     END;
  476.  
  477.     CMXYZType = RECORD
  478.         typeDescriptor:            OSType;                                    { 'XYZ ' }
  479.         reserved:                LONGINT;                                { fill with 0x00 }
  480.         XYZ:                    ARRAY [0..0] OF CMFixedXYZColor;        { variable size XYZ tristimulus values }
  481.     END;
  482.  
  483. { Profile sequence description type }
  484.     CMProfileSequenceDescType = RECORD
  485.         typeDescriptor:            OSType;                                    { 'pseq ' }
  486.         reserved:                LONGINT;                                { fill with 0x00 }
  487.         count:                    LONGINT;                                { Number of descriptions
  488.                                                          * variable size fields to follow, to access them, must count bytes }
  489.         profileDescription:            RECORD
  490.                 deviceMfg:                        OSType;                            { Device Manufacturer }
  491.                 deviceModel:                    OSType;                            { Decvice Model }
  492.                 attributes:                        ARRAY [0..1] OF LONGINT;        { Device attributes }
  493.                 technology:                        OSType;                            { Technology signature }
  494.                 mfgDescASCIICount:                LONGINT;                        { the count of "bytes" }
  495.                 mfgDescASCIIName:                ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  496.                 mfgDescUniCodeCode:                LONGINT;
  497.                 mfgDescUniCodeCount:            LONGINT;                        { the count of characters, each character has two bytes }
  498.                 mfgDescUniCodeName:                ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  499.                 mfgDescScriptCodeCode:            LONGINT;
  500.                 mfgDescScriptCodeCount:            LONGINT;                        { the count of "bytes" }
  501.                 mfgDescScriptCodeName:            ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  502.                 modelDescASCIICount:            LONGINT;                        { the count of "bytes" }
  503.                 modelDescASCIIName:                ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  504.                 modelDescUniCodeCode:            LONGINT;
  505.                 modelDescUniCodeCount:            LONGINT;                        { the count of characters, each character has two bytes }
  506.                 modelDescUniCodeName:            ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  507.                 modelDescScriptCodeCode:        INTEGER;
  508.                 modelDescScriptCodeCount:        SInt8; (* unsigned char *)        { the count of "bytes" }
  509.                 modelDescScriptCodeName:        ARRAY [0..1] OF SInt8; (* unsigned char *) { Variable size }
  510.             END;
  511.  
  512.  
  513.     END;
  514.  
  515. { Under color removal, black generation type }
  516.     CMUcrBgType = RECORD
  517.         typeDescriptor:            OSType;                                    { 'bfd  ' }
  518.         reserved:                LONGINT;                                { fill with 0x00 }
  519.         ucrCount:                LONGINT;                                { Number of UCR entries }
  520.         ucrValues:                ARRAY [0..0] OF INTEGER;                { variable size }
  521.         bgCount:                LONGINT;                                { Number of BG entries }
  522.         bgValues:                ARRAY [0..0] OF INTEGER;                { variable size }
  523.         ucrbgASCII:                ARRAY [0..0] OF SInt8; (* unsigned char *) { null terminated ASCII string }
  524.     END;
  525.  
  526.     CMIntentCRDVMSize = RECORD
  527.         renderingIntent:        LONGINT;                                { rendering intent }
  528.         VMSize:                    LONGINT;                                { VM size taken up by the CRD }
  529.     END;
  530.  
  531.     CMPS2CRDVMSizeType = RECORD
  532.         typeDescriptor:            OSType;                                    { 'psvm' }
  533.         reserved:                LONGINT;                                { fill with 0x00 }
  534.         count:                    LONGINT;                                { number of intent entries }
  535.         intentCRD:                ARRAY [0..0] OF CMIntentCRDVMSize;        { variable size }
  536.     END;
  537.  
  538. {**********************************************************************}
  539. {************** ColorSync 1.0 profile specification *******************}
  540. {**********************************************************************}
  541.  
  542. CONST
  543.     cmGrayResponse                = 0;
  544.     cmRedResponse                = 1;
  545.     cmGreenResponse                = 2;
  546.     cmBlueResponse                = 3;
  547.     cmCyanResponse                = 4;
  548.     cmMagentaResponse            = 5;
  549.     cmYellowResponse            = 6;
  550.     cmUcrResponse                = 7;
  551.     cmBgResponse                = 8;
  552.     cmOnePlusLastResponse        = 9;
  553.  
  554. { Device types }
  555.     cmMonitorDevice                = 'mntr';
  556.     cmScannerDevice                = 'scnr';
  557.     cmPrinterDevice                = 'prtr';
  558.  
  559.  
  560. TYPE
  561.     CMIString = RECORD
  562.         theScript:                ScriptCode;
  563.         theString:                Str63;
  564.     END;
  565.  
  566. { Profile options }
  567.  
  568. CONST
  569.     cmPerceptualMatch            = $0000;                        { Default. For photographic images }
  570.     cmColorimetricMatch            = $0001;                        { Exact matching when possible }
  571.     cmSaturationMatch            = $0002;                        { For solid colors }
  572.  
  573. { Profile flags }
  574.     cmNativeMatchingPreferred    = $00000001;                    { Default to native not preferred }
  575.     cmTurnOffCache                = $00000002;                    { Default to turn on CMM cache }
  576.  
  577.     
  578. TYPE
  579.     CMMatchOption = LONGINT;
  580.  
  581.     CMMatchFlag = LONGINT;
  582.  
  583.     CMHeader = RECORD
  584.         size:                    LONGINT;
  585.         CMMType:                OSType;
  586.         applProfileVersion:        LONGINT;
  587.         dataType:                OSType;
  588.         deviceType:                OSType;
  589.         deviceManufacturer:        OSType;
  590.         deviceModel:            LONGINT;
  591.         deviceAttributes:        ARRAY [0..1] OF LONGINT;
  592.         profileNameOffset:        LONGINT;
  593.         customDataOffset:        LONGINT;
  594.         flags:                    CMMatchFlag;
  595.         options:                CMMatchOption;
  596.         white:                    CMXYZColor;
  597.         black:                    CMXYZColor;
  598.     END;
  599.  
  600.     CMProfileChromaticities = RECORD
  601.         red:                    CMXYZColor;
  602.         green:                    CMXYZColor;
  603.         blue:                    CMXYZColor;
  604.         cyan:                    CMXYZColor;
  605.         magenta:                CMXYZColor;
  606.         yellow:                    CMXYZColor;
  607.     END;
  608.  
  609.     CMProfileResponse = RECORD
  610.         counts:                    ARRAY [0..cmOnePlusLastResponse-1] OF INTEGER;
  611.         data:                    ARRAY [0..0] OF INTEGER;                { Variable size }
  612.     END;
  613.  
  614.     CMProfile = RECORD
  615.         header:                    CMHeader;
  616.         profile:                CMProfileChromaticities;
  617.         response:                CMProfileResponse;
  618.         profileName:            CMIString;
  619.         customData:                ARRAY [0..0] OF CHAR;                    { Variable size }
  620.     END;
  621.  
  622.     CMProfilePtr = ^CMProfile;
  623.     CMProfileHandle = ^CMProfilePtr;
  624.  
  625. {$IFC OLDROUTINENAMES }
  626.  
  627. CONST
  628.     kCMApplProfileVersion        = cmCS1ProfileVersion;
  629.  
  630.     grayResponse                = cmGrayResponse;
  631.     redResponse                    = cmRedResponse;
  632.     greenResponse                = cmGreenResponse;
  633.     blueResponse                = cmBlueResponse;
  634.     cyanResponse                = cmCyanResponse;
  635.     magentaResponse                = cmMagentaResponse;
  636.     yellowResponse                = cmYellowResponse;
  637.     ucrResponse                    = cmUcrResponse;
  638.     bgResponse                    = cmBgResponse;
  639.     onePlusLastResponse            = cmOnePlusLastResponse;
  640.  
  641.     rgbData                        = cmRGBData;
  642.     cmykData                    = cmCMYKData;
  643.     grayData                    = cmGrayData;
  644.     xyzData                        = cmXYZData;
  645.  
  646.     monitorDevice                = cmMonitorDevice;
  647.     scannerDevice                = cmScannerDevice;
  648.     printerDevice                = cmPrinterDevice;
  649.  
  650.     
  651. TYPE
  652.     XYZComponent = INTEGER;
  653.  
  654.     XYZColor = CMXYZColor;
  655.  
  656.     CMResponseData = INTEGER;
  657.  
  658.     IString = CMIString;
  659.  
  660.     CMResponseColor = LONGINT;
  661.  
  662.     responseColor = CMResponseColor;
  663.  
  664. {$ENDC}
  665.  
  666. {$ALIGN RESET}
  667. {$POP}
  668.  
  669. {$SETC UsingIncludes := CMICCProfileIncludes}
  670.  
  671. {$ENDC} {__CMICCPROFILE__}
  672.  
  673. {$IFC NOT UsingIncludes}
  674.  END.
  675. {$ENDC}
  676.